#include <iostream>
#include "stack.h"

using namespace std;

int main()
{
	stack<int,1> s;
	cout << "s.is_empty() = " << s.is_empty() << endl;
	s.push(13);
	cout << "s.is_full() = " << s.is_full() << endl;
	try
	{
		s.push(23);
	}
	catch (exception e)
	{
		cout << e.what() << endl;
	}
	cout << "s.empty_space() = " << s.empty_space() << ", s.size() = " << s.size() << endl;
	cout << "s.pop() = " << s.pop() << endl;
	cout << "s.empty_space() = " << s.empty_space() << ", s.size() = " << s.size() << endl;
	try
	{
		cout << s.pop() << endl;
	}
	catch (exception e)
	{
		cout << e.what() << endl;
	}

	stack<int, 20> fakstack;

	for (int i = 5; i > 0; i--)
	{
		fakstack.push(i);
	}
	int fak = 1;
	while (fakstack.size() != 0)
	{
		fak *= fakstack.pop();
	}

	cout << "5! = " << fak << endl;

	system("pause");
	return 0;
}